//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bio.Util;
using System.Threading.Tasks;

namespace MBT.Escience.Parse
{
    public class ParallelOptionsParser 
    {
        [Parse(ParseAction.Required)]
        public uint MaxDegreeOfParallelism;

        public static implicit operator ParallelOptions(ParallelOptionsParser parser)
        {
            return new ParallelOptions() { MaxDegreeOfParallelism = (int)parser.MaxDegreeOfParallelism };
        }

        public static implicit operator ParallelOptionsParser(ParallelOptions parallelOptions)
        {
            return new ParallelOptionsParser() { MaxDegreeOfParallelism = (uint)parallelOptions.MaxDegreeOfParallelism };
        }
    }
}
